<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/4/17
 * Time: 10:39
 */

namespace model;

use think\Model;

class Account extends BaseModel
{
    protected $insert = ['reg_ip',"reg_time","password"];
    public function setRegIpAttr(){
        return request()->ip();
    }
    public function setRegTimeAttr(){
        return time();
    }
    public function setPasswordAttr($value){
        return md5($value);
    }
}